package datastruct.entity;

public class Attribute {
	private String name;
	private String value;
	private String sentece=null;
	public Attribute(String name)
	{
		this.name = name;
		this.value = "";
	}
	public Attribute(String name,String value)
	{
		this.name = name;
		this.value = value;
	}
	public void setValue(String value)
	{
		this.value = value;
	}
	public String getValue()
	{
		return this.value;
	}
	public String getName()
	{
		return this.name;
	}
	public String toString()
	{
		String str = this.name+"=\""+this.value+"\"";
		if(this.sentece!=null) str += "|sentence=\""+this.sentece+"\"";
		return str;
	}
	public void setSentence(String sentence)
	{
		this.sentece = sentence;
	}
	public String getSentence()
	{
		return this.sentece;
	}
	public boolean equals(Attribute otherAttribute)
	{
		if(this.name.equals(otherAttribute.getName())&&this.value.equals(otherAttribute.getValue())&&this.sentece.equals(otherAttribute.getSentence())) return true;
		else return false;
	}
}
